<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .search {
            width: 80px;
            height: 40px;
            border-radius: 40px;
            border: 2px solid lightblue;
            position: absolute;
            right: 200px;
            outline: none;
            text-indent: 12px;
            color: #666;
            font-size: 16px;
            padding: 0;
            transition: width 0.5s;
        }

        .search:focus {
            width: 200px;
        }
    </style>
</head>

<body>
    <input class="search" type="text" placeholder="搜索...">
</body>

</html>